<div class="text_area">
	<form action="{actualurl}" method="post" class="reply">
		<fieldset>
			{if $errors}
				{foreach from=$errors item='error'}
					<div class="error alert-warning alert">{$error}</div>
				{/foreach}
			{/if}
			
			<div class="row">
				<div class="col-lg-12 col-md-12 col-sm-12 col-xs-12">
					<textarea class="form-control" rows="3" cols="40" placeholder="Správa *" name="bodytext" required>{$values.bodytext}</textarea>
				</div>
			</div>

			<input type="hidden" name="fk_from_user_id" value="{$loggedUser.uid}">
			<input type="hidden" name="fk_to_user_id" value="{$toUser.uid}">
			<input type="hidden" name="chat" value="1">
		</fieldset>
		<button class="btn btn-color submit pull-right" type="submit">Odoslať</button>
		<div class="clearfix"></div>
	</form>

	{if $messageList}
		{foreach from=$messageList item='message'}
			<div class="item">
				<p{if $message.is_read == 0} style="font-weight: bold;"{/if}>{humandate starttime=$message.crdate} <strong>{$message.from.username}</strong>: {$message.bodytext|nl2br}</p>
			</div>
		{/foreach}
	{/if}
</div>